package es.udc.emarketapp.emarket.model.orderLine.dao;

import es.udc.emarketapp.emarket.model.orderDetails.vo.OrderDetailsVO;
import es.udc.emarketapp.emarket.model.orderLine.vo.OrderLineVO;
import es.udc.fbellas.j2ee.util.exceptions.InstanceNotFoundException;
import es.udc.fbellas.j2ee.util.exceptions.InternalErrorException;
import java.sql.Connection;
import java.util.List;

public interface SQLOrderLineDAO {

    public OrderLineVO create(Connection connection, OrderLineVO lineorederVO)
            throws InternalErrorException;

    public boolean exists(Connection connection, Long nLinea, Long nPedido, Long nCompra)
            throws InternalErrorException;

    public OrderLineVO findById(Connection connection, Long nLinea, Long nPedido, Long nCompra)
            throws InstanceNotFoundException, InternalErrorException;

    public List<OrderLineVO> findByOrder(Connection connection, Long nPedido, Long nCompra,
            int startIndex, int count) throws InternalErrorException;

    public List<OrderLineVO> findAll(Connection connection,
            int startIndex, int count) throws InternalErrorException;

    public int countUdsByOrder(Connection connection, Long nPedido)
            throws InternalErrorException, InstanceNotFoundException;

    public void update(Connection connection, OrderLineVO orderLineVO)
            throws InstanceNotFoundException, InternalErrorException;

    public void remove(Connection connection, Long nLinea, Long nPedido, Long nCompra)
            throws InstanceNotFoundException, InternalErrorException;
}
